import uiautomation

class zuofeijiesuan():
        his = uiautomation.WindowControl(searchDepth=1, Name='科玛奇医院信息管理系统')  # 锁定窗口
        his.SetFocus()
        #作废结算窗口
        zuofeijiesuanchuangkou =  his.WindowControl(ClassName='Window')
        #住院号
        zhuyuanhao = zuofeijiesuanchuangkou.EditControl(AutomationId='ZYHtxt',ClassName='TextBox')
        #输入住院号
        def input_zyh(self,zyh):
                self.zhuyuanhao.SendKeys(zyh)
        #查询按钮
        chaxun = zuofeijiesuanchuangkou.ButtonControl(Name='查询')
        zuofeijiesuan = zuofeijiesuanchuangkou.ButtonControl(Name='作废结算')
        #点击查询
        def click_cx_btn(self):
                self.chaxun.Click()
        #点击作废结算
        def click_zfjs_btn(self):
                self.zuofeijiesuan.Click()

        #关闭出院结算窗口
        def close_window(self):
                self.zuofeijiesuanchuangkou.GetWindowPattern().Close()


